package classes.Staff;
import db.Jdbc;
/**
 * @Auther: 程嘉明
 * @Date: 2018/8/22/022 15:22
 * @Description:工人类
 * 工人只能查询工资的发放
 * 选定任务是否完成
 * 在规定的时间内打卡
 */
public class Worker extends  Staff{
    public Worker(String ID, String GDBS, String ZJLX, long ZJHM,int RYLB,String NAME,int SWX,String NATION,String NATLIVEPLACE,String WHCD,String PASS) throws Exception {
        super(ID,GDBS,ZJLX,ZJHM,RYLB,NAME,SWX,NATION,NATLIVEPLACE,WHCD,PASS);
        Jdbc.getConnection();
        //创建一个对象时就在数据库中加入一条记录
        String sql="insert into t_gdryjbxx values('"+ID+"','"+GDBS+"','"+ZJLX+"','"+ZJHM+"','"+RYLB+"','"+NAME+"','"+SWX+"','"+NATION+"','"+NATLIVEPLACE+"','"+WHCD+"','"+PASS+"'); ";
        Jdbc.stat.executeUpdate(sql);
        sql="insert into salary values('"+ID+"',5000,2000,0,0,7000);";
        Jdbc.stat1.executeUpdate(sql);
    }

    public static void main(String[] args) throws Exception {
        new Worker("T000008","A","中华人民共和国居民身份证",124512452,1,"李武",1,"中国","山东济南","本科","asd02200");
    }
}
